﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productcrud1.aspx.cs" Inherits="Ecreate.Web.systemanage.product.productcrud1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <style type="text/css">
        ul{float:none;list-style:none;margin:0px;width:400px;height:30px;}
        .ll{float:left;margin:0px 0px 0px 0px;width:120px;text-align:right;}
        .rr{float:right;margin:0px;width:280px;}
    </style>
    <script type="text/javascript">
        function CheckImageFile() {
            var obj = document.getElementById('FileUpload1');
            if (obj.value == '') {
                alert('请选择要上传的文件。');
                return false;
            }
            var stuff = obj.value.match(/^(.*)(\.)(.{1,8})$/)[3];
            stuff = stuff.toLowerCase();
            if (stuff != 'jpg' && stuff != 'gif' && stuff != 'bmp') {
                alert('文件类型不正确，请选择jpg，gif或bmp文件。');
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <ul>
        <li class="ll">产品信息： </li>
        <li class="rr"><asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" /></li>
    </ul>
    <ul>
        <li class="ll">产品名称： </li>
        <li class="rr"><asp:TextBox ID="txtPname" runat="server"></asp:TextBox></li>
    </ul>
    <ul style="height:410px;">
        <li class="ll">产品描述： </li>
        <li class="rr"><asp:TextBox ID="txtPdescription" runat="server" 
                TextMode="MultiLine" Width="400px" Height="400px"></asp:TextBox></li>
    </ul>
    <ul>
        <li class="ll">产品图片： </li>
        <li class="rr">
            <asp:FileUpload ID="FileUpload1" runat="server" />
            <asp:Button ID="btnUpload" runat="server" Text="上传" OnClientClick="return CheckImageFile()" onclick="btnUpload_Click" />
        </li>
    </ul>
    <ul>
        <li class="ll">图片预览： </li>
        <li class="rr"><asp:Image ID="imgPreview" runat="server" /></li>
    </ul>
    <ul>
        <li class="ll">产品价格： </li>
        <li class="rr"><asp:TextBox ID="txtPrice" runat="server"></asp:TextBox></li>
    </ul>
    <ul>
        <li class="ll">是否推荐： </li>
        <li class="rr"><asp:CheckBox ID="ckbIsHot" runat="server" /></li>
    </ul>
    <ul>
        <li class="ll">是否打折： </li>
        <li class="rr"><asp:CheckBox ID="ckbIsSale" runat="server" /></li>
    </ul>
    <ul>
        <li class="ll">是否下架： </li>
        <li class="rr"><asp:CheckBox ID="ckbIsDown" runat="server" /></li>
    </ul>
    </div>
    <input id="hid_classid" type="hidden" runat="server" />
    </form>
</body>
</html>
